<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    {% load static %}
    <link rel="shortcut icon" href="{% static 'favicon.ico' %}">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <title>职位画像系统</title>
    <link rel="stylesheet" href="{% static 'layui/css/layui.css' %}" media="all">
	 <link rel="stylesheet" href="{% static 'css/admin.css' %}" media="all">
    <style>
        li {
            cursor: pointer;
        }
        #category_item .layui-nav-item>a{
            color:#333 !important;
        }
        #category_item .layui-this a{
            color: #00F !important;
        }
    </style>
</head>
<body class="layui-layout-body" layadmin-themealias="dark-blue">
<div id="LAY_app">
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header"><!--头部区域-->
            <ul class="layui-nav layui-layout-left" id="category_item">
                 <li class="layui-nav-item layui-this"><a href="javascript:">全部</a></li>
                {% load cache %}
                {% cache 500 'aaa' %}
                    {% for item in category_list %}
                        <li class="layui-nav-item"><a href="javascript:">{{ item.category }}</a></li>
                    {% endfor %}
                {% endcache %}
            </ul>
        </div>
        <div class="layui-side layui-side-menu">
            <div class="layui-side-scroll">
                <div class="layui-logo" lay-href="/"><a href="/"><img
                        src="http://www.ibeifeng.com/themes/newibeifeng/img/new1611/base/logo_03.png" alt="layui"></a>
                </div>
                <ul class="layui-nav layui-nav-tree" id="L_demoNav" lay-filter="nav_list">
                    <li class="layui-nav-item layui-this">
                        <a data-href="/zwyx/dd_index/">地点薪资分析图</a>
                    </li>
                    <li class="layui-nav-item">
                        <a data-href="/zwyx/xl_index/">学历薪资分析图</a>
                    </li>
                    <li class="layui-nav-item">
                        <a data-href="/zwyx/gsgm_index/">公司规模分析图</a>
                    </li>
                    <li class="layui-nav-item">
                        <a data-href="/zwyx/gsxz_index/">公司性质分析图</a>
                    </li>
                    <li class="layui-nav-item">
                        <a data-href="/zwyx/gshy_index/">公司行业分析图</a>
                    </li>
                    <li class="layui-nav-item">
                        <a data-href="/zwyx/type_index/">职位类型分析图</a>
                    </li>
                    <li class="layui-nav-item">
                        <a data-href="/zp/wordcloud/">职位技能词云</a>
                    </li>
                    <li class="layui-nav-item">
                        <a data-href="/zwyx/zwyx_zw_count/">各就业方向分析图</a>
                    </li>
                </ul>
            </div>
        </div>
        <div class='layui-body'>
		    <iframe src="/zwyx/dd_index/" width="100%" id="show_iframe" onload="changeFrameHeight()" frameborder="0"></iframe>
	    </div>
	    <div class="layui-clear"></div>
    </div>
</div>
    <script src="{% static 'js/jquery-1.12.0.min.js' %}"  type="text/javascript"></script>
    <script src="{% static 'layui/layui.js' %}" charset="utf-8" type="text/javascript"></script>
	<script>
        function changeFrameHeight() {
                var ifm = document.getElementById("show_iframe");
                var a = document.getElementsByTagName('a')[0];
                var dheight = document.documentElement.clientHeight;
                ifm.height = dheight - a.offsetHeight - 5;
            }
            window.onresize = function () {
                changeFrameHeight();
            };
		layui.link('/static/css/common.css');
		layui.use(['jquery', 'layer','element'], function(){
			var $ = layui.jquery,
				layer = layui.layer;
			layer.msg('欢迎使用北风网智联招聘职位画像系统',{icon: 6,time: 1000 });
            $(function () {
                $('#L_demoNav a').click(function () {
                    var index = layer.load(3, {time: 5*1000});
                    $('li').removeClass('layui-nav-itemed');
                    $(this).parent().addClass('layui-nav-itemed');
                    $("#show_iframe").attr('src', $(this).data('href'));
                    $("#category_item li").attr('class','layui-nav-item');
                    $("#category_item li").eq(0).attr('class','layui-nav-item layui-this');
                });
                $('#category_item a').click(function () {
                    var index = layer.load(3, {time: 5*1000});
                    var zwlb_value=$(this).html();
                    if(zwlb_value=='全部'){
                        $("#show_iframe").attr('src', $("#L_demoNav .layui-this>a").data('href'));
                    }
                    else{
                        $("#show_iframe").attr('src', $("#L_demoNav .layui-this>a").data('href')+'?zwlb='+zwlb_value);
                    }
                })
            });
        });
	</script>

</body>
</html>